package com.ctp.ui.main;

import java.awt.Toolkit;

import javax.swing.JFrame;

public class MainFrame extends JFrame {

	private static final long serialVersionUID = 1L;

	private MainDesktop desktop = new MainDesktop();

	public MainFrame() {
		this.setSize(S_WIDTH, S_HEIGHT);
		this.setResizable(false);

		initFrameLocation();

		this.setContentPane(desktop);
		this.setTitle("AutoTrader(CTP)");

		this.setDefaultCloseOperation(MainFrame.EXIT_ON_CLOSE);
		this.setVisible(true);
	}

	private void initFrameLocation() {
		int width = Toolkit.getDefaultToolkit().getScreenSize().width;
		int height = Toolkit.getDefaultToolkit().getScreenSize().height;

		this.setLocation((width - S_WIDTH) / 2, (height - S_HEIGHT) / 2);
	}

	private static final int S_WIDTH = 1150;

	private static final int S_HEIGHT = 625;

}
